<?php $this->beginContent('/layouts/main');?>

        <!-- Main Content -->
        <div id="main">
        	<hr class="clearfix" />
        	    <?php if(isset($this->breadcrumbs)):?>
					<?php $this->widget('ext.jbreadcrumbs.jbreadcrumbsWidget',array(
							'links'=>$this->breadcrumbs
					));?>
				<?php endif;?>
				<hr class="clearfix" />
			<?php echo $content;?>		
		</div>
		        <!-- Sidebar -->
        <div id="sidebar">
              <input type="text" value="Search" default-value="Search" class="search" />
         <div  id="scroll-widget">     
			<?php if ($this->id == 'work' && $this->action->id == 'view'):?>
				<?php $this->widget('application.components.panels.WorkViewPanel',array(
							'id'=>$_GET['id']
						))?>
	        <?php endif;?>
              
        
             <?php if (!Yii::app()->user->isGuest):?>
				<?php $this->widget('application.components.panels.QuickPanel',array(
							'route'=>$this->id
						));?>
			<?php else:?>
			<div class="widget">
				<h5>用户登录</h5>
				
				<?php $this->widget('ext.login.loginWidget',array(
							
						));?>				
			</div>

			<?php endif;?>
            <!-- Media Categories -->
            <div class="widget" id="categories">
                <h5>相册分类</h5>					
				<?php		
					echo UtilTree::generateTree(Category::model()->getMenuByType(Category::CATEGORY_MEDIA),0,'/work/list',array('class'=>'categories'));
				?>
            </div>
            <!-- /Meida Categories -->       
        </div>
   </div>
<?php $this->endContent();?>
